1. Field of the Invention
The present invention relates generally to an automatic electronic control system comprising a microcomputer system and mounted on an automotive vehicle for controlling various vehicle devices, such as an internal combustion engine, a spark ignition system, an exhaust gas recirculation system, various driver indicators, and so on. More particularly, the present invention relates to the method used in an interrupt processing system in a multiprogramming system of the microcomputer system for controlling the various vehicle devices.
2. Description of the Prior Art
As is known to those skilled in the art, recently it has become quite popular to control various vehicle devices with a microcomputer system. The microcomputer in an automotive vehicle control system is operated so as to control various vehicle devices with reference to data values inputted from various sensors. For example, in the case of controlling an internal combustion engine, sensor signals inputted and processed in the microcomputer may be engine speed, air flow rate, engine or coolant temperature, or the switch position of various electrical switching means. In such an automatic control system for an automotive vehicle, there is often included a multiprogramming system for processing various data values inputted into the computer so as to perform various control operations for various vehicle devices in properly sequenced priority. The multiprogramming system contains various routines, some of which process the data values at relatively high speed and others of which process the inputs at relatively ordinary speed.
Generally, the higher speed processing routines are interrupt processing routines, which include a schedule control routine. During execution of the schedule control routine, priority will be provided to each of the interrupt processing routines to be executed in response to interrupt signals. The priority of each interrupt processing routine is determined, depending on the priority of the corresponding interrupt signals.
In such a conventional interrupt processing system, resource allocation is relatively frequently made for transferring or rolling out routines undergoing processing to an auxiliary memory together with data which is being processed. Routines to be executed are assigned priorities when a relatively lower priority routine is being executed and an interrupt signal commanding execution of a routine with a relatively high priority is inputted, the operation of the microcomputer enters into an interrupt state, and thereby the routine which has previously been undergoing processing is interrupted and transferred out of the main unit or CPU. The entire routine does not have to be transferred. Only enough data values to represent the routine and the point at which execution stopped need be stored. These values may comprise the contents of the program counter (stored in two bytes), the index register (stored in two bytes), the accumulator (stored in two bytes) and the condition code register (stored in one byte). After execution of the interrupt routine which has relatively high priority, the previous interrupted routine with its relevant data values is returned to the main unit for its execution to be continued. According to such a conventional interrupt processing system, there is required a large capacity auxiliary memory for transferring the interrupted programs. This necessity is made more clear by considering multiple interrupts which occur within a short period of time, during which the processing of none of them can be completed. For example, when five different interrupt signals are inputted during execution of an ordinary routine, transfers will take place five times. In practice, for temporarily storing interrupted routines, a random access memory generally has been used (hereinafter referred to as a RAM) in the microcomputer unit. In the case of Motorola's microcomputer Model No. 6800, for example, for transferring one routine, altogether, seven bytes of RAM are used. Therefore, in such a system, when transfers occur five times, a total of thirty-five bytes of RAM must be used for temporarily storing the interrupted routines. In the case of the above-mentioned Motorola's Model No. 6800, there is generally provided a hundred and twenty-eight bytes of RAM. Therefore, if there are reserved thirty-five bytes of RAM for transfer, the average capacity of the RAM for use in execution of routines will be restricted. This may cause difficulty structuring programs or routines. However, although in the conventional system a relatively large capacity of memory is required for transfer, multiple simultaneous interruptions may not occur very frequently. Therefore, in the conventional interrupt processing system, some bytes of RAM are not often used, but are reserved for transfers which possibly may not take place, thus causing inconvenience of programming or high cost of such a multiprogramming system.